<template>
<uni-shadow-root class="partials-productList-oneColumns-oneColumns"><template name="oneColumns">
<block v-if="relateBean.length!=0">
<view v-for="(relateBean,index) in (relateBean)" :key="relateBean.index" class="oneColumnsBox" v-if="jsonData.count>0?index<jsonData.count:'true'" @click="tolinkUrl" :data-info="relateBean">      
    <view class="oneColumnsBoxImg">
        <image mode="aspectFill" :src="(relateBean.imagePath)+'?x-oss-process=style/preview'"></image>
        <view class="product_jifen_block" v-if="relateBean.needJifen">需消耗
          <text class="product_jifen_text" :style="'color: '+(defaultColor)+';'">{{relateBean.needJifen}}积分</text>
        </view>
        <view class="sold_out_block" v-if="relateBean.stock<=0">售罄</view>
    </view>
    <view class="oneColumnsBoxName" :style="'width:'+((1/jsonData.column)*sysWidth-40)+'px;'">{{relateBean.name}}</view>
    <view class="oneColumnsBoxMoney">
        <text>￥{{relateBean.price}}</text>
    </view>
</view>
</block>
<block v-if="relateBean.length==0">
    <view class="noproduct">
      <image mode="widthFix" src="https://image1.sansancloud.com/xianhua/2019_12/16/15/54/55_950.jpg?x-oss-process=style/preview_120"></image>
      <text>没有相关商品</text>
    </view>
</block>
</template></uni-shadow-root>
</template>

<script>

global['__wxRoute'] = 'partials/productList/oneColumns/oneColumns'

Component({})

export default global['__wxComponents']['partials/productList/oneColumns/oneColumns']
</script>
<style platform="mp-weixin">
.oneColumnsBox{
  width: 690rpx;
  height: 530rpx;
  padding: 10rpx 30rpx 10rpx 30rpx;
  overflow: hidden;
}
.oneColumnsBoxImg{
  width: 100%;
  height: 426.42rpx;
  overflow: hidden;
  border-radius: 0.2em;
  position: relative;
}
.oneColumnsBoxImg image{
  width: 100%;
  height: 100%;
}
.oneColumnsBoxName{
    text-align: left;
    margin-top: 10rpx;
    font-size: 25rpx;
    display: -webkit-box;
    word-break: break-all;
    text-overflow: ellipsis;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp:2;
}
.oneColumnsBoxMoney{
  width: 100%;
}
.oneColumnsBoxMoney text{
  font-size: 30rpx;
  display: block;
  color: red;
}
</style>